def use_method():
    """
    容器的一些方法
    :return:
    """

    # zip
    a = (1,2,3)
    b =('a','b','c')
    print(list(zip(a,b)))  # 变成列表
    print(dict(zip(a,b)))  # 变成字典

    # enumerate
    seasons = ['Spring','Summer','Fall','Winter']
    list2 = list(enumerate(seasons))
    print(list2)
    my_dict = dict(list2)
    print(my_dict)
    print({v:k for k,v in my_dict.items()})  #反过来


if __name__ == '__main__':
    use_method()
